DecSoft Clipboard app plugin

This app plugin for DecSoft App Builder provide some useful JavaScript methods to deal with the user clipboard.

Methods

app.plugins.decsoft.clipboard.isSupported()

Use this method to check if the clipboard manipulation is available in the current browser / platform. This method do not require any argument.

app.plugins.decsoft.clipboard.setText()

Use this method to copy certain specified text into the user clipboard.

This method admits the below arguments:

Name Type Description
text String Specify the text that you want to be copied into the user clipboard.
successCallback Function Specify an optional function, which is executed when the text has been successfully copied into the clipboard.
errorCallback Function Specify an optional function, which is executed if some error occur while copy the text into the clipboard. This function receives one string argument, with the error message.
This app plugin is based in the clipboard.js JavaScript library.
There is a Clipboard sample app included with the installation of DecSoft App Builder. Take a look to see this app plugin in action!